<?php

namespace App;

use Nette,
	Nette\Application\Routers\RouteList,
	Nette\Application\Routers\Route,
	Nette\Application\Routers\SimpleRouter;


/**
 * Router factory.
 */
class RouterFactory
{

	/**
	 * @return \Nette\Application\IRouter
	 */
	public function createRouter(){
    
    /* user router */
//		$router[] = $usersRouter = new RouteList('AdminModule');
//		$usersRouter[] = new Route('admin', 'Default:default');
//
//		/* lesson router */
//		$router[] = $lessonRouter = new RouteList('FrontModule');
//		$lessonRouter[] = new Route('', 'Default:default');
//		$lessonRouter[] = new Route('kytarove_lekce', 'Lessons:list');
//		$lessonRouter[] = new Route('kytarove_lekce/video', 'Lessons:video');
//		$lessonRouter[] = new Route('kytarove_lekce[/<name>]', 'Lessons:detail');
//
//		/** default page for web*/
//		$router[] = new Route('index.php', 'Front:Homepage:default', Route::ONE_WAY);
//		return $router;
    
    $router = new RouteList();
      
    $router[] = new Route('admin/<presenter>/<action>[/<id>]', array(
        'module' => 'Admin', 
        'presenter' => 'Homepage', 
        'action' => 'default')
    );
    
    $router[] = new Route('profil[/<action>]', array(
        'module' => 'Front', 
        'presenter' => 'User', 
        'action' => 'detail')
    );
    
    $router[] = new Route('aktivace/<code>', array(
        'module' => 'Front', 
        'presenter' => 'Homepage', 
        'action' => 'activation')
    );
    
    $router[] = new Route('lekce-kytary', array(
        'module' => 'Front', 
        'presenter' => 'Lessons', 
        'action' => 'list')
    );
    
    $router[] = new Route('lekce-kytary[/<name>]', array(
        'module' => 'Front', 
        'presenter' => 'Lessons', 
        'action' => 'detail')
    );
    
    $router[] = new Route('detail[/<link>]', array(
        'module' => 'Front', 
        'presenter' => 'Page', 
        'action' => 'default')
    );
    
    $router[] = new Route('clanky[/<link>]', array(
        'module' => 'Front', 
        'presenter' => 'Article', 
        'action' => 'default')
    );
    
    $router[] = new Route('akordy', array(
        'module' => 'Front', 
        'presenter' => 'Chords', 
        'action' => 'default')
    );
    
//    $router[] = new Route('kytarove_lekce/video', array(
//        'module' => 'Front', 
//        'presenter' => 'Lessons', 
//        'action' => 'video')
//    );
//    
    
    
    
    
    $router[] = new Route('<presenter>/<action>[/<id>]', array(
        'module' => 'Front', 
        'presenter' => 'Homepage', 
        'action' => 'default')
    );
    
    $router[] = new Route('index.php', 'Front:Homepage:default', Route::ONE_WAY);
    
    return $router;
	}

}
